﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace FCP.Data.Migrations
{
    public partial class init : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "t_chart",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    label_label_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    chart_type = table.Column<int>(type: "integer", nullable: false),
                    api = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    split_ratio = table.Column<int>(type: "integer", nullable: false),
                    min_width = table.Column<int>(type: "integer", nullable: false),
                    is_visible_src_data = table.Column<bool>(type: "boolean", nullable: false),
                    num = table.Column<int>(type: "integer", nullable: false),
                    filter_org_type = table.Column<int>(type: "integer", nullable: false),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_chart", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_custom",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    label_label_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    custom_info = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    custom_params = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_custom", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_custom_btn",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    custom_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    btn_label_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    btn_page_type = table.Column<int>(type: "integer", nullable: false),
                    btn_func_type = table.Column<int>(type: "integer", nullable: false),
                    btn_type = table.Column<int>(type: "integer", nullable: false),
                    is_need_auth = table.Column<bool>(type: "boolean", nullable: false),
                    format_func_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    btn_css = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    btn_icon = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    form_code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    custom_params = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    is_select_active = table.Column<bool>(type: "boolean", nullable: false),
                    is_need_confirm = table.Column<bool>(type: "boolean", nullable: false),
                    service_code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    api = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    save_close_type = table.Column<int>(type: "integer", nullable: false),
                    save_clear_type = table.Column<int>(type: "integer", nullable: false),
                    num = table.Column<int>(type: "integer", nullable: false),
                    is_visible = table.Column<bool>(type: "boolean", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_custom_btn", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_edit",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    save_api = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    get_api = table.Column<string>(type: "text", nullable: true),
                    get_id_api = table.Column<string>(type: "text", nullable: true),
                    service_code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    children_id_field_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    parent_nav_field_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    is_detail_required = table.Column<bool>(type: "boolean", nullable: false),
                    field_sort_list = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    field_order_list = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    default_org_type = table.Column<int>(type: "integer", nullable: false),
                    is_visible_check = table.Column<bool>(type: "boolean", nullable: false),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    parent_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    is_leaf = table.Column<bool>(type: "boolean", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    entity_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    label_label_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    num = table.Column<int>(type: "integer", nullable: false),
                    width = table.Column<int>(type: "integer", nullable: false),
                    height = table.Column<int>(type: "integer", nullable: false),
                    custom_params = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_edit", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_edit_btn",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    edit_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    btn_label_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    btn_page_type = table.Column<int>(type: "integer", nullable: false),
                    btn_func_type = table.Column<int>(type: "integer", nullable: false),
                    btn_type = table.Column<int>(type: "integer", nullable: false),
                    is_need_auth = table.Column<bool>(type: "boolean", nullable: false),
                    format_func_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    btn_css = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    btn_icon = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    form_code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    custom_params = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    is_select_active = table.Column<bool>(type: "boolean", nullable: false),
                    is_need_confirm = table.Column<bool>(type: "boolean", nullable: false),
                    service_code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    api = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    save_close_type = table.Column<int>(type: "integer", nullable: false),
                    save_clear_type = table.Column<int>(type: "integer", nullable: false),
                    num = table.Column<int>(type: "integer", nullable: false),
                    is_visible = table.Column<bool>(type: "boolean", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_edit_btn", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_edit_field",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    edit_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    is_can_edit = table.Column<bool>(type: "boolean", nullable: false),
                    field_type = table.Column<int>(type: "integer", nullable: false),
                    edit_panel_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    is_can_edit_by_batch = table.Column<bool>(type: "boolean", nullable: false),
                    edit_form_code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    vir_prompt_info_label = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    verify_express = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    verify_type = table.Column<int>(type: "integer", nullable: false),
                    vir_verify_error_label = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    is_can_copy = table.Column<bool>(type: "boolean", nullable: false),
                    serial_type_code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    field_name = table.Column<string>(type: "text", nullable: true),
                    field_label_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    is_visible = table.Column<bool>(type: "boolean", nullable: false),
                    field_case = table.Column<int>(type: "integer", nullable: false),
                    show_form_code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    show_id_field = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    num = table.Column<int>(type: "integer", nullable: false),
                    custom_params = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    is_required = table.Column<bool>(type: "boolean", nullable: false),
                    field_width = table.Column<int>(type: "integer", nullable: false),
                    fixed_type = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    default_value = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    is_need_auth = table.Column<bool>(type: "boolean", nullable: false),
                    dropdown_api = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dropdown_entity_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dropdown_service_code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dropdown_id_field = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dropdown_filter_field = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dropdown_sort_field = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dropdown_sort_order = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dropdown_label_field = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dropdown_show_field = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dropdown_src_field = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dropdown_dest_field = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dropdown_filter_org_type = table.Column<int>(type: "integer", nullable: false),
                    dropdown_keep_value_by_no_src = table.Column<bool>(type: "boolean", nullable: false),
                    enum_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_edit_field", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_edit_field_filter_field",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    edit_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    edit_field_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    edit_field_filter_group_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    field_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    operate_type = table.Column<int>(type: "integer", nullable: false),
                    value = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    is_custom_field = table.Column<bool>(type: "boolean", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_edit_field_filter_field", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_edit_field_filter_group",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    edit_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    edit_field_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    parent_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    is_leaf = table.Column<bool>(type: "boolean", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_edit_field_filter_group", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_edit_field_map",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    edit_field_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    src_nav = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dest_nav = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_edit_field_map", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_edit_field_map_detail",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    edit_field_map_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    src_field_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dest_field_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_edit_field_map_detail", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_edit_panel",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    edit_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    label_label_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    is_default_expand = table.Column<bool>(type: "boolean", nullable: false),
                    is_visible = table.Column<bool>(type: "boolean", nullable: false),
                    num = table.Column<int>(type: "integer", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_edit_panel", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_enum",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    enum_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_enum", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_enum_detail",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    enum_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    label = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    value = table.Column<int>(type: "integer", nullable: false),
                    sort_index = table.Column<int>(type: "integer", nullable: false),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_enum_detail", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_form",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    code = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true),
                    name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    platform_type = table.Column<int>(type: "integer", nullable: false),
                    form_type = table.Column<int>(type: "integer", nullable: false),
                    module_type = table.Column<int>(type: "integer", nullable: false),
                    js_file_paths = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    enable_status = table.Column<int>(type: "integer", nullable: false),
                    remark = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_form", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_form_version",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    remove_cookie_key = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_form_version", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_label",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_label", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_label_detail",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    label_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    lang = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    label = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_label_detail", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_search",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    label_label_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    search_visible_type = table.Column<int>(type: "integer", nullable: false),
                    entity_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    num = table.Column<int>(type: "integer", nullable: false),
                    filter_org_type = table.Column<int>(type: "integer", nullable: false),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_search", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_search_field",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    search_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    field_type = table.Column<int>(type: "integer", nullable: false),
                    default_value = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    is_custom_field = table.Column<bool>(type: "boolean", nullable: false),
                    enum_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    is_required = table.Column<bool>(type: "boolean", nullable: false),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    field_name = table.Column<string>(type: "text", nullable: true),
                    field_label_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    is_visible = table.Column<bool>(type: "boolean", nullable: false),
                    field_case = table.Column<int>(type: "integer", nullable: false),
                    show_form_code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    show_id_field = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    num = table.Column<int>(type: "integer", nullable: false),
                    custom_params = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_search_field", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_table",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    is_visible_check = table.Column<bool>(type: "boolean", nullable: false),
                    check_type = table.Column<int>(type: "integer", nullable: false),
                    api = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    service_code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    field_sort = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    field_order = table.Column<int>(type: "integer", nullable: false),
                    field_sort_list = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    field_order_list = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    class_field_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    class_func_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    page_position = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    parent_src_field_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    children_filter_field_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    is_visible_footer = table.Column<bool>(type: "boolean", nullable: false),
                    footer_sum_type = table.Column<int>(type: "integer", nullable: false),
                    is_visible_row_no = table.Column<bool>(type: "boolean", nullable: false),
                    filter_org_type = table.Column<int>(type: "integer", nullable: false),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    parent_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    is_leaf = table.Column<bool>(type: "boolean", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    entity_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    label_label_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    num = table.Column<int>(type: "integer", nullable: false),
                    width = table.Column<int>(type: "integer", nullable: false),
                    height = table.Column<int>(type: "integer", nullable: false),
                    custom_params = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_table", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_table_btn",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    table_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    btn_label_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    btn_page_type = table.Column<int>(type: "integer", nullable: false),
                    btn_func_type = table.Column<int>(type: "integer", nullable: false),
                    btn_type = table.Column<int>(type: "integer", nullable: false),
                    is_need_auth = table.Column<bool>(type: "boolean", nullable: false),
                    format_func_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    btn_css = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    btn_icon = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    form_code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    custom_params = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    is_select_active = table.Column<bool>(type: "boolean", nullable: false),
                    is_need_confirm = table.Column<bool>(type: "boolean", nullable: false),
                    service_code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    api = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    save_close_type = table.Column<int>(type: "integer", nullable: false),
                    save_clear_type = table.Column<int>(type: "integer", nullable: false),
                    num = table.Column<int>(type: "integer", nullable: false),
                    is_visible = table.Column<bool>(type: "boolean", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_table_btn", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_table_field",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    table_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    field_type = table.Column<int>(type: "integer", nullable: false),
                    format_func_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    footer_sum_type = table.Column<int>(type: "integer", nullable: false),
                    table_panel_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    field_name = table.Column<string>(type: "text", nullable: true),
                    field_label_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    is_visible = table.Column<bool>(type: "boolean", nullable: false),
                    field_case = table.Column<int>(type: "integer", nullable: false),
                    show_form_code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    show_id_field = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    num = table.Column<int>(type: "integer", nullable: false),
                    custom_params = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    is_required = table.Column<bool>(type: "boolean", nullable: false),
                    field_width = table.Column<int>(type: "integer", nullable: false),
                    fixed_type = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    default_value = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    is_need_auth = table.Column<bool>(type: "boolean", nullable: false),
                    dropdown_api = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dropdown_entity_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dropdown_service_code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dropdown_id_field = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dropdown_filter_field = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dropdown_sort_field = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dropdown_sort_order = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dropdown_label_field = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dropdown_show_field = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dropdown_src_field = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dropdown_dest_field = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    dropdown_filter_org_type = table.Column<int>(type: "integer", nullable: false),
                    dropdown_keep_value_by_no_src = table.Column<bool>(type: "boolean", nullable: false),
                    enum_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_table_field", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_table_field_filter_field",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    table_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    table_field_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    table_field_filter_group_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    field_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    operate_type = table.Column<int>(type: "integer", nullable: false),
                    value = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    is_custom_field = table.Column<bool>(type: "boolean", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_table_field_filter_field", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_table_field_filter_group",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    table_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    table_field_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    parent_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    is_leaf = table.Column<bool>(type: "boolean", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_table_field_filter_group", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_table_filter_field",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    table_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    table_filter_group_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    field_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    operate_type = table.Column<int>(type: "integer", nullable: false),
                    value = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    is_custom_field = table.Column<bool>(type: "boolean", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_table_filter_field", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_table_filter_group",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    table_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    parent_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    is_leaf = table.Column<bool>(type: "boolean", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_table_filter_group", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_table_panel",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    table_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    label_label_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    is_default_expand = table.Column<bool>(type: "boolean", nullable: false),
                    is_visible = table.Column<bool>(type: "boolean", nullable: false),
                    num = table.Column<int>(type: "integer", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_table_panel", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_tree",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    label_label_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    api = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    entity_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    field_sort = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    field_order = table.Column<int>(type: "integer", nullable: false),
                    parent_src_field_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    custom_params = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    filter_org_type = table.Column<int>(type: "integer", nullable: false),
                    num = table.Column<int>(type: "integer", nullable: false),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_tree", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_tree_btn",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    tree_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    btn_label_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    btn_page_type = table.Column<int>(type: "integer", nullable: false),
                    btn_func_type = table.Column<int>(type: "integer", nullable: false),
                    btn_type = table.Column<int>(type: "integer", nullable: false),
                    is_need_auth = table.Column<bool>(type: "boolean", nullable: false),
                    format_func_name = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    btn_css = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    btn_icon = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    form_code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    custom_params = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    is_select_active = table.Column<bool>(type: "boolean", nullable: false),
                    is_need_confirm = table.Column<bool>(type: "boolean", nullable: false),
                    service_code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    api = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    save_close_type = table.Column<int>(type: "integer", nullable: false),
                    save_clear_type = table.Column<int>(type: "integer", nullable: false),
                    num = table.Column<int>(type: "integer", nullable: false),
                    is_visible = table.Column<bool>(type: "boolean", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_tree_btn", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "t_tree_field",
                columns: table => new
                {
                    id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    tree_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    org_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    create_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    modify_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false),
                    row_version = table.Column<int>(type: "integer", nullable: false),
                    fcp_form_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    field_name = table.Column<string>(type: "text", nullable: true),
                    field_label_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
                    is_visible = table.Column<bool>(type: "boolean", nullable: false),
                    field_case = table.Column<int>(type: "integer", nullable: false),
                    show_form_code = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    show_id_field = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true),
                    num = table.Column<int>(type: "integer", nullable: false),
                    custom_params = table.Column<string>(type: "character varying(600)", maxLength: 600, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_tree_field", x => x.id);
                });

            migrationBuilder.CreateIndex(
                name: "IX_t_form_code",
                table: "t_form",
                column: "code");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "t_chart");

            migrationBuilder.DropTable(
                name: "t_custom");

            migrationBuilder.DropTable(
                name: "t_custom_btn");

            migrationBuilder.DropTable(
                name: "t_edit");

            migrationBuilder.DropTable(
                name: "t_edit_btn");

            migrationBuilder.DropTable(
                name: "t_edit_field");

            migrationBuilder.DropTable(
                name: "t_edit_field_filter_field");

            migrationBuilder.DropTable(
                name: "t_edit_field_filter_group");

            migrationBuilder.DropTable(
                name: "t_edit_field_map");

            migrationBuilder.DropTable(
                name: "t_edit_field_map_detail");

            migrationBuilder.DropTable(
                name: "t_edit_panel");

            migrationBuilder.DropTable(
                name: "t_enum");

            migrationBuilder.DropTable(
                name: "t_enum_detail");

            migrationBuilder.DropTable(
                name: "t_form");

            migrationBuilder.DropTable(
                name: "t_form_version");

            migrationBuilder.DropTable(
                name: "t_label");

            migrationBuilder.DropTable(
                name: "t_label_detail");

            migrationBuilder.DropTable(
                name: "t_search");

            migrationBuilder.DropTable(
                name: "t_search_field");

            migrationBuilder.DropTable(
                name: "t_table");

            migrationBuilder.DropTable(
                name: "t_table_btn");

            migrationBuilder.DropTable(
                name: "t_table_field");

            migrationBuilder.DropTable(
                name: "t_table_field_filter_field");

            migrationBuilder.DropTable(
                name: "t_table_field_filter_group");

            migrationBuilder.DropTable(
                name: "t_table_filter_field");

            migrationBuilder.DropTable(
                name: "t_table_filter_group");

            migrationBuilder.DropTable(
                name: "t_table_panel");

            migrationBuilder.DropTable(
                name: "t_tree");

            migrationBuilder.DropTable(
                name: "t_tree_btn");

            migrationBuilder.DropTable(
                name: "t_tree_field");
        }
    }
}
